package com.zx.BookSeaReader.greendao.gen;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.zx.BookSeaReader.entity.bookstore.BookType;
import com.zx.BookSeaReader.greendao.entity.Book;
import com.zx.BookSeaReader.greendao.entity.BookChapterComment;
import com.zx.BookSeaReader.greendao.entity.BookCommentBean;
import com.zx.BookSeaReader.greendao.entity.BookLabelBean;
import com.zx.BookSeaReader.greendao.entity.BookListBean;
import com.zx.BookSeaReader.greendao.entity.BookListCollect;
import com.zx.BookSeaReader.greendao.entity.BookListSubscribe;
import com.zx.BookSeaReader.greendao.entity.Chapter;
import com.zx.BookSeaReader.greendao.entity.SearchHistory;
import com.zx.BookSeaReader.greendao.entity.SubscribeBean;
import com.zx.BookSeaReader.greendao.entity.UserBean;

import com.zx.BookSeaReader.greendao.gen.BookTypeDao;
import com.zx.BookSeaReader.greendao.gen.BookDao;
import com.zx.BookSeaReader.greendao.gen.BookChapterCommentDao;
import com.zx.BookSeaReader.greendao.gen.BookCommentBeanDao;
import com.zx.BookSeaReader.greendao.gen.BookLabelBeanDao;
import com.zx.BookSeaReader.greendao.gen.BookListBeanDao;
import com.zx.BookSeaReader.greendao.gen.BookListCollectDao;
import com.zx.BookSeaReader.greendao.gen.BookListSubscribeDao;
import com.zx.BookSeaReader.greendao.gen.ChapterDao;
import com.zx.BookSeaReader.greendao.gen.SearchHistoryDao;
import com.zx.BookSeaReader.greendao.gen.SubscribeBeanDao;
import com.zx.BookSeaReader.greendao.gen.UserBeanDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig bookTypeDaoConfig;
    private final DaoConfig bookDaoConfig;
    private final DaoConfig bookChapterCommentDaoConfig;
    private final DaoConfig bookCommentBeanDaoConfig;
    private final DaoConfig bookLabelBeanDaoConfig;
    private final DaoConfig bookListBeanDaoConfig;
    private final DaoConfig bookListCollectDaoConfig;
    private final DaoConfig bookListSubscribeDaoConfig;
    private final DaoConfig chapterDaoConfig;
    private final DaoConfig searchHistoryDaoConfig;
    private final DaoConfig subscribeBeanDaoConfig;
    private final DaoConfig userBeanDaoConfig;

    private final BookTypeDao bookTypeDao;
    private final BookDao bookDao;
    private final BookChapterCommentDao bookChapterCommentDao;
    private final BookCommentBeanDao bookCommentBeanDao;
    private final BookLabelBeanDao bookLabelBeanDao;
    private final BookListBeanDao bookListBeanDao;
    private final BookListCollectDao bookListCollectDao;
    private final BookListSubscribeDao bookListSubscribeDao;
    private final ChapterDao chapterDao;
    private final SearchHistoryDao searchHistoryDao;
    private final SubscribeBeanDao subscribeBeanDao;
    private final UserBeanDao userBeanDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        bookTypeDaoConfig = daoConfigMap.get(BookTypeDao.class).clone();
        bookTypeDaoConfig.initIdentityScope(type);

        bookDaoConfig = daoConfigMap.get(BookDao.class).clone();
        bookDaoConfig.initIdentityScope(type);

        bookChapterCommentDaoConfig = daoConfigMap.get(BookChapterCommentDao.class).clone();
        bookChapterCommentDaoConfig.initIdentityScope(type);

        bookCommentBeanDaoConfig = daoConfigMap.get(BookCommentBeanDao.class).clone();
        bookCommentBeanDaoConfig.initIdentityScope(type);

        bookLabelBeanDaoConfig = daoConfigMap.get(BookLabelBeanDao.class).clone();
        bookLabelBeanDaoConfig.initIdentityScope(type);

        bookListBeanDaoConfig = daoConfigMap.get(BookListBeanDao.class).clone();
        bookListBeanDaoConfig.initIdentityScope(type);

        bookListCollectDaoConfig = daoConfigMap.get(BookListCollectDao.class).clone();
        bookListCollectDaoConfig.initIdentityScope(type);

        bookListSubscribeDaoConfig = daoConfigMap.get(BookListSubscribeDao.class).clone();
        bookListSubscribeDaoConfig.initIdentityScope(type);

        chapterDaoConfig = daoConfigMap.get(ChapterDao.class).clone();
        chapterDaoConfig.initIdentityScope(type);

        searchHistoryDaoConfig = daoConfigMap.get(SearchHistoryDao.class).clone();
        searchHistoryDaoConfig.initIdentityScope(type);

        subscribeBeanDaoConfig = daoConfigMap.get(SubscribeBeanDao.class).clone();
        subscribeBeanDaoConfig.initIdentityScope(type);

        userBeanDaoConfig = daoConfigMap.get(UserBeanDao.class).clone();
        userBeanDaoConfig.initIdentityScope(type);

        bookTypeDao = new BookTypeDao(bookTypeDaoConfig, this);
        bookDao = new BookDao(bookDaoConfig, this);
        bookChapterCommentDao = new BookChapterCommentDao(bookChapterCommentDaoConfig, this);
        bookCommentBeanDao = new BookCommentBeanDao(bookCommentBeanDaoConfig, this);
        bookLabelBeanDao = new BookLabelBeanDao(bookLabelBeanDaoConfig, this);
        bookListBeanDao = new BookListBeanDao(bookListBeanDaoConfig, this);
        bookListCollectDao = new BookListCollectDao(bookListCollectDaoConfig, this);
        bookListSubscribeDao = new BookListSubscribeDao(bookListSubscribeDaoConfig, this);
        chapterDao = new ChapterDao(chapterDaoConfig, this);
        searchHistoryDao = new SearchHistoryDao(searchHistoryDaoConfig, this);
        subscribeBeanDao = new SubscribeBeanDao(subscribeBeanDaoConfig, this);
        userBeanDao = new UserBeanDao(userBeanDaoConfig, this);

        registerDao(BookType.class, bookTypeDao);
        registerDao(Book.class, bookDao);
        registerDao(BookChapterComment.class, bookChapterCommentDao);
        registerDao(BookCommentBean.class, bookCommentBeanDao);
        registerDao(BookLabelBean.class, bookLabelBeanDao);
        registerDao(BookListBean.class, bookListBeanDao);
        registerDao(BookListCollect.class, bookListCollectDao);
        registerDao(BookListSubscribe.class, bookListSubscribeDao);
        registerDao(Chapter.class, chapterDao);
        registerDao(SearchHistory.class, searchHistoryDao);
        registerDao(SubscribeBean.class, subscribeBeanDao);
        registerDao(UserBean.class, userBeanDao);
    }
    
    public void clear() {
        bookTypeDaoConfig.clearIdentityScope();
        bookDaoConfig.clearIdentityScope();
        bookChapterCommentDaoConfig.clearIdentityScope();
        bookCommentBeanDaoConfig.clearIdentityScope();
        bookLabelBeanDaoConfig.clearIdentityScope();
        bookListBeanDaoConfig.clearIdentityScope();
        bookListCollectDaoConfig.clearIdentityScope();
        bookListSubscribeDaoConfig.clearIdentityScope();
        chapterDaoConfig.clearIdentityScope();
        searchHistoryDaoConfig.clearIdentityScope();
        subscribeBeanDaoConfig.clearIdentityScope();
        userBeanDaoConfig.clearIdentityScope();
    }

    public BookTypeDao getBookTypeDao() {
        return bookTypeDao;
    }

    public BookDao getBookDao() {
        return bookDao;
    }

    public BookChapterCommentDao getBookChapterCommentDao() {
        return bookChapterCommentDao;
    }

    public BookCommentBeanDao getBookCommentBeanDao() {
        return bookCommentBeanDao;
    }

    public BookLabelBeanDao getBookLabelBeanDao() {
        return bookLabelBeanDao;
    }

    public BookListBeanDao getBookListBeanDao() {
        return bookListBeanDao;
    }

    public BookListCollectDao getBookListCollectDao() {
        return bookListCollectDao;
    }

    public BookListSubscribeDao getBookListSubscribeDao() {
        return bookListSubscribeDao;
    }

    public ChapterDao getChapterDao() {
        return chapterDao;
    }

    public SearchHistoryDao getSearchHistoryDao() {
        return searchHistoryDao;
    }

    public SubscribeBeanDao getSubscribeBeanDao() {
        return subscribeBeanDao;
    }

    public UserBeanDao getUserBeanDao() {
        return userBeanDao;
    }

}
